home *** CD-ROM | disk | FTP | other *** search
/ STraTOS 1997 April & May / STraTOS 1 - 1997 April & May.iso / CD01 / INTERNET / BROWSERS / WWW131.ZIP / WWW131 / SETUP / DOC / DEBUG.TXT < prev    next >
Encoding:
Text File  |  1996-06-01  |  1.4 KB  |  37 lines

  1. Debugging
  2. ---------
  3.  
  4. setup.prg, install.prg and config.prg can all output logging 
  5. information. This is normally sunk except when a .log file of the same 
  6. name as the program is detected in whatever directory TOS thinks is 
  7. the current one. The .log file gets overwritten each and every time 
  8. the associated program is run. Delete the .log file to stop logging 
  9. for the program.
  10.  
  11. Example 1:
  12.  
  13. You have an active window open on h:\www\setup\ and run setup.prg, you 
  14. need to create h:\www\setup\install.log and h:\www\setup\config.log to 
  15. get logging performed. They can contain any old garbage as they will 
  16. be overwritten.
  17.  
  18. Example 2:
  19.  
  20. You have an active window open on h:\www\setup\install\ and run 
  21. install.prg directly. You need to create 
  22. h:\www\setup\install\install.log and also 
  23. h:\www\setup\install\config.log
  24.  
  25. I know this is a little complicated but shel_read() is not available 
  26. for interrogation so an access is performed using just the filename 
  27. with no path information. Users of systems where the TOS current 
  28. directory can differ from that of the program can use this feature to 
  29. implement a logging directory.
  30.  
  31. Each invocation of the log function opens and closes the file. This is 
  32. slow but effective in ensuring the log is up to date if there is a 
  33. crash. Failure by the log function to access the file results in a 
  34. text message being dumped rudely onscreen - but at least you will 
  35. know!
  36.  
  37.